home *** CD-ROM | disk | FTP | other *** search
- // Copyright (C) 1997-2002 Alias|Wavefront,
- // a division of Silicon Graphics Limited.
- //
- // The information in this file is provided for the exclusive use of the
- // licensees of Alias|Wavefront. Such users have the right to use, modify,
- // and incorporate this code into other products for purposes authorized
- // by the Alias|Wavefront license agreement, without fee.
- //
- // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- // PERFORMANCE OF THIS SOFTWARE.
- //
- //
- // Alias|Wavefront Script File
- // MODIFY THIS AT YOUR OWN RISK
- //
- // Creation Date: 31 May 1997
- //
- // Procedure Name:
- // HotboxSouthMenu
- //
- // Description:
- // Create the user customizable Hotbox South Menu for hotbox
- //
- // Input Arguments:
- // parent to parent the menu to.
- //
- // Return Value:
- // None.
- //
-
-
-
-
- global proc switchPanelToType(string $panelType) {
- string $curPanel = `getPanel -withFocus`;
- string $firstPanel;
-
- if ($curPanel == "" || $panelType == "")
- return;
-
- // If the panel is torn-off then abort operation.
- //
- int $tornOff = `panel -q -tearOff $curPanel`;
- if ($tornOff) return;
-
-
- switch ($panelType) {
- case "Outliner":
- string $allPanelsOfType[] = `getPanel -typ outlinerPanel`;
- $firstPanel = $allPanelsOfType[0];
- if ($firstPanel != "" && !`panel -q -to $firstPanel`)
- outlinerPanel -e -rp $curPanel $firstPanel;
- break;
-
- case "GraphEditor":
- string $allPanelsOfType[] = `getPanel -sty graphEditor`;
- $firstPanel = $allPanelsOfType[0];
- if ($firstPanel != "" && !`panel -q -to $firstPanel`)
- scriptedPanel -e -rp $curPanel $firstPanel;
- break;
-
- case "DopeSheet":
- string $allPanelsOfType[] = `getPanel -sty dopeSheetPanel`;
- $firstPanel = $allPanelsOfType[0];
- if ($firstPanel != "" && !`panel -q -to $firstPanel`)
- scriptedPanel -e -rp $curPanel $firstPanel;
- break;
-
- case "Hypergraph":
- string $allPanelsOfType[] = `getPanel -sty hyperGraphPanel`;
- $firstPanel = $allPanelsOfType[0];
- if ($firstPanel != "" && !`panel -q -to $firstPanel`)
- scriptedPanel -e -rp $curPanel $firstPanel;
- break;
-
- case "Hypershade":
- string $allPanelsOfType[] = `getPanel -sty hyperShadePanel`;
- $firstPanel = $allPanelsOfType[0];
- if ($firstPanel != "" && !`panel -q -to $firstPanel`)
- scriptedPanel -e -rp $curPanel $firstPanel;
- break;
-
- case "DynRelationships":
- string $allPanelsOfType[] = `getPanel -sty dynRelEdPanel`;
- $firstPanel = $allPanelsOfType[0];
- if ($firstPanel != "" && !`panel -q -to $firstPanel`)
- scriptedPanel -e -rp $curPanel $firstPanel;
- break;
-
- case "Multilister":
- string $allPanelsOfType[] = `getPanel -sty multiListerPanel`;
- $firstPanel = $allPanelsOfType[0];
- if ($firstPanel != "" && !`panel -q -to $firstPanel`)
- scriptedPanel -e -rp $curPanel $firstPanel;
- break;
-
- case "RenderView":
- string $allPanelsOfType[] = `getPanel -sty renderWindowPanel`;
- $firstPanel = $allPanelsOfType[0];
- if ($firstPanel != "" && !`panel -q -to $firstPanel`)
- scriptedPanel -e -rp $curPanel $firstPanel;
- break;
-
- case "SetEditor":
- string $allPanelsOfType[] = `getPanel -sty relationshipPanel`;
- $firstPanel = $allPanelsOfType[0];
- if ($firstPanel != "" && !`panel -q -to $firstPanel`)
- scriptedPanel -e -rp $curPanel $firstPanel;
- relationshipEditorBeginTask($firstPanel,"setMembership",3);
- break;
-
- }
- }
-
-
-
- global proc HotboxSouthMenu( string $parent )
- {
- setParent -m $parent;
- if( `menu -q -ni $parent` != 0 ) {
- //
- // Menu is built already - just return
- //
- return;
- }
-
-
- menuItem -rp "N" -l "Outliner"
- -c "switchPanelToType Outliner";
-
- menuItem -rp "E" -l "Graph Editor"
- -c "switchPanelToType GraphEditor";
-
- menuItem -rp "SE" -l "Dope Sheet"
- -c "switchPanelToType DopeSheet";
-
- menuItem -rp "S" -l "Hypergraph"
- -c "switchPanelToType Hypergraph";
-
- menuItem -rp "SW" -l "Dynamic Relationships"
- -c "switchPanelToType DynRelationships";
-
- menuItem -rp "W" -l "Hypershade"
- -c "switchPanelToType Hypershade";
-
- menuItem -rp "NW" -l "Render View"
- -c "switchPanelToType RenderView";
-
- menuItem -rp "NE" -l "Set Editor"
- -c "switchPanelToType SetEditor";
-
- setParent -m ..;
-
- }
-